package genetic.q1.functions.sumlist.statements;

import genetic.q1.WithallPhenotype;
import genetic.q1.functions.Program;
import genetic.q1.functions.ProgramObject;
import genetic.q1.functions.Statement;

public class End extends Statement{

	public End() {
		super("End", new ProgramObject[0]);
	}

	@Override
	public Statement CreateInstance(ProgramObject[] evals) {
		return new End();
	}

	@Override
	public ProgramObject choose(int j, int i, WithallPhenotype withallPhenotype) {
		return null;
	}

	@Override
	public int execute(Program program) {
		return getParam();
	}

	@Override
	public String getObjectName() {
		return "End();";
	}
	
	@Override
	public boolean isEndStatement() {
		return true;
	}

	@Override
	public int getNumVars() {
		return 0;
	}
	
	@Override
	public String toString() {
		return "} //" + getParam(); 
	}

}
